#include<iostream>
using namespace std;
int main()
{
	int a, b, c, d;
	cout << "a:";
	cin >> a;
	cout << "b:";
	cin >> b;
	cout << "c:";
	cin >> c;
	cout << "d:";
	cin >> d;
	do {
		if (a > b)
		{
			a = a + b;
			b = a - b;
			a = a - b;
		}
		if (a > c)
		{
			a = a + c;
			c = a - c;
			a = a - c;
		}
		if (a > d)
		{
			a = a + d;
			d = a - d;
			a = a - d;
		}
		if (b > c)
		{
			b = b + c;
			c = b - c;
			b = b - c;
		}
		if (b > d)
		{
			b = b + d;
			d = b - d;
			b = b - d;
		}
		if (c > d)
		{
			c = c + d;
			d = c - d;
			c = c - d;
		}
		if (a < b&&b < c&&c < d)
			break;
	} while (1);
	cout << a << b << c << d;
	int key;
	cin >> key;
	return 0;
}